package cn.brilliantfuture.commentry.entity;

// Generated 2013-6-28 10:01:44 by Hibernate Tools 3.3.0.GA

import java.util.Date;
import javax.persistence.Column;
import javax.persistence.Entity;
import javax.persistence.GeneratedValue;
import static javax.persistence.GenerationType.IDENTITY;

import javax.persistence.FetchType;
import javax.persistence.Id;
import javax.persistence.JoinColumn;
import javax.persistence.ManyToOne;
import javax.persistence.Table;
import javax.persistence.Temporal;
import javax.persistence.TemporalType;
import org.hibernate.validator.Length;
import org.hibernate.validator.NotNull;

/**
 * EmailInfo generated by hbm2java
 */
@Entity
@Table(name = "email_info", catalog = "cabinet")
public class EmailInfo implements java.io.Serializable {

	private static final long serialVersionUID = 1L;
	private Integer emailInfoId;
	private LanguageInfo languageInfo;
	private String title;
	private Integer applyOrient;
	private Integer emailUse;
	private String content;
	private Date insertTime;
	private int insertUser;
	private boolean deleted;

	public EmailInfo() {
	}

	public EmailInfo(LanguageInfo languageInfo, Integer applyOrient, Integer emailUse,
			String content, Date insertTime, int insertUser, boolean deleted) {
		this.languageInfo = languageInfo;
		this.applyOrient = applyOrient;
		this.emailUse = emailUse;
		this.content = content;
		this.insertTime = insertTime;
		this.insertUser = insertUser;
		this.deleted = deleted;
	}

	@Id
	@GeneratedValue(strategy = IDENTITY)
	@Column(name = "email_info_id", unique = true, nullable = false)
	public Integer getEmailInfoId() {
		return this.emailInfoId;
	}

	public void setEmailInfoId(Integer emailInfoId) {
		this.emailInfoId = emailInfoId;
	}

	@Column(name = "content", nullable = false, length = 200)
	@NotNull
	@Length(max = 200)
	public String getContent() {
		return this.content;
	}

	public void setContent(String content) {
		this.content = content;
	}

	@Temporal(TemporalType.TIMESTAMP)
	@Column(name = "insert_time", nullable = false, length = 19)
	@NotNull
	public Date getInsertTime() {
		return this.insertTime;
	}

	public void setInsertTime(Date insertTime) {
		this.insertTime = insertTime;
	}

	@Column(name = "insert_user", nullable = false)
	public int getInsertUser() {
		return this.insertUser;
	}

	public void setInsertUser(int insertUser) {
		this.insertUser = insertUser;
	}

	@Column(name = "deleted", nullable = false)
	public boolean isDeleted() {
		return this.deleted;
	}

	public void setDeleted(boolean deleted) {
		this.deleted = deleted;
	}

	@ManyToOne(fetch = FetchType.LAZY)
	@JoinColumn(name = "language_info_id", nullable = false)
	public LanguageInfo getLanguageInfo() {
		return languageInfo;
	}

	public void setLanguageInfo(LanguageInfo languageInfo) {
		this.languageInfo = languageInfo;
	}

	@Column(name = "apply_orient", nullable = false)
	public Integer getApplyOrient() {
		return applyOrient;
	}

	public void setApplyOrient(Integer applyOrient) {
		this.applyOrient = applyOrient;
	}

	@Column(name = "email_use", nullable = false)
	public Integer getEmailUse() {
		return emailUse;
	}

	public void setEmailUse(Integer emailUse) {
		this.emailUse = emailUse;
	}

	@Column(name = "title", nullable = false, length = 100)
	@NotNull
	@Length(max = 100)
	public String getTitle() {
		return title;
	}

	public void setTitle(String title) {
		this.title = title;
	}
}
